# class A:
#
#     def __iter__(self):  # 将一个对象设置成了一个可迭代对象
#         yield 1
#         yield 2
#
#
# obj = A()  # 他现在已经变成可迭代对象
# print(next(obj)) #  报错!

# for i in obj:
#     print(i)

# iterator1 = iter(obj)
# print(next(iterator1))
# print(next(iterator1))

# print(list(obj))
# print(obj)